3.27 \(\int \frac {(3-x+2 x^2)^2}{(2+3 x+5 x^2)^2} \, dx\)

Optimal. Leaf size=63 \[ \frac {121 (69 x+61)}{3875 \left (5 x^2+3 x+2\right )}-\frac {22}{125} \log \left (5 x^2+3 x+2\right )+\frac {4 x}{25}+\frac {41932 \tan ^{-1}\left (\frac {10 x+3}{\sqrt {31}}\right )}{3875 \sqrt {31}} \]

[Out]

4/25*x+121/3875*(61+69*x)/(5*x^2+3*x+2)-22/125*ln(5*x^2+3*x+2)+41932/120125*arctan(1/31*(3+10*x)*31^(1/2))*31^
(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {1660, 1657, 634, 618, 204, 628} \[ \frac {121 (69 x+61)}{3875 \left (5 x^2+3 x+2\right )}-\frac {22}{125} \log \left (5 x^2+3 x+2\right )+\frac {4 x}{25}+\frac {41932 \tan ^{-1}\left (\frac {10 x+3}{\sqrt {31}}\right )}{3875 \sqrt {31}} \]

Antiderivative was successfully verified.

[In]

Int[(3 - x + 2*x^2)^2/(2 + 3*x + 5*x^2)^2,x]

[Out]

(4*x)/25 + (121*(61 + 69*x))/(3875*(2 + 3*x + 5*x^2)) + (41932*ArcTan[(3 + 10*x)/Sqrt[31]])/(3875*Sqrt[31]) -
(22*Log[2 + 3*x + 5*x^2])/125

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rubi steps

\begin {align*} \int \frac {\left (3-x+2 x^2\right )^2}{\left (2+3 x+5 x^2\right )^2} \, dx &=\frac {121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac {1}{31} \int \frac {\frac {4032}{25}-\frac {992 x}{25}+\frac {124 x^2}{5}}{2+3 x+5 x^2} \, dx\\ &=\frac {121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac {1}{31} \int \left (\frac {124}{25}+\frac {44 (86-31 x)}{25 \left (2+3 x+5 x^2\right )}\right ) \, dx\\ &=\frac {4 x}{25}+\frac {121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac {44}{775} \int \frac {86-31 x}{2+3 x+5 x^2} \, dx\\ &=\frac {4 x}{25}+\frac {121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}-\frac {22}{125} \int \frac {3+10 x}{2+3 x+5 x^2} \, dx+\frac {20966 \int \frac {1}{2+3 x+5 x^2} \, dx}{3875}\\ &=\frac {4 x}{25}+\frac {121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}-\frac {22}{125} \log \left (2+3 x+5 x^2\right )-\frac {41932 \operatorname {Subst}\left (\int \frac {1}{-31-x^2} \, dx,x,3+10 x\right )}{3875}\\ &=\frac {4 x}{25}+\frac {121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac {41932 \tan ^{-1}\left (\frac {3+10 x}{\sqrt {31}}\right )}{3875 \sqrt {31}}-\frac {22}{125} \log \left (2+3 x+5 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 59, normalized size = 0.94 \[ \frac {\frac {3751 (69 x+61)}{5 x^2+3 x+2}-21142 \log \left (5 x^2+3 x+2\right )+19220 x+41932 \sqrt {31} \tan ^{-1}\left (\frac {10 x+3}{\sqrt {31}}\right )}{120125} \]

Antiderivative was successfully verified.

[In]

Integrate[(3 - x + 2*x^2)^2/(2 + 3*x + 5*x^2)^2,x]

[Out]

(19220*x + (3751*(61 + 69*x))/(2 + 3*x + 5*x^2) + 41932*Sqrt[31]*ArcTan[(3 + 10*x)/Sqrt[31]] - 21142*Log[2 + 3
*x + 5*x^2])/120125

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 78, normalized size = 1.24 \[ \frac {96100 \, x^{3} + 41932 \, \sqrt {31} {\left (5 \, x^{2} + 3 \, x + 2\right )} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + 57660 \, x^{2} - 21142 \, {\left (5 \, x^{2} + 3 \, x + 2\right )} \log \left (5 \, x^{2} + 3 \, x + 2\right ) + 297259 \, x + 228811}{120125 \, {\left (5 \, x^{2} + 3 \, x + 2\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)^2/(5*x^2+3*x+2)^2,x, algorithm="fricas")

[Out]

1/120125*(96100*x^3 + 41932*sqrt(31)*(5*x^2 + 3*x + 2)*arctan(1/31*sqrt(31)*(10*x + 3)) + 57660*x^2 - 21142*(5
*x^2 + 3*x + 2)*log(5*x^2 + 3*x + 2) + 297259*x + 228811)/(5*x^2 + 3*x + 2)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 52, normalized size = 0.83 \[ \frac {41932}{120125} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {4}{25} \, x + \frac {121 \, {\left (69 \, x + 61\right )}}{3875 \, {\left (5 \, x^{2} + 3 \, x + 2\right )}} - \frac {22}{125} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)^2/(5*x^2+3*x+2)^2,x, algorithm="giac")

[Out]

41932/120125*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 4/25*x + 121/3875*(69*x + 61)/(5*x^2 + 3*x + 2) - 22/
125*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 51, normalized size = 0.81 \[ \frac {4 x}{25}+\frac {41932 \sqrt {31}\, \arctan \left (\frac {\left (10 x +3\right ) \sqrt {31}}{31}\right )}{120125}-\frac {22 \ln \left (5 x^{2}+3 x +2\right )}{125}-\frac {11 \left (-\frac {759 x}{775}-\frac {671}{775}\right )}{25 \left (x^{2}+\frac {3}{5} x +\frac {2}{5}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2-x+3)^2/(5*x^2+3*x+2)^2,x)

[Out]

4/25*x-11/25*(-759/775*x-671/775)/(x^2+3/5*x+2/5)-22/125*ln(5*x^2+3*x+2)+41932/120125*31^(1/2)*arctan(1/31*(10
*x+3)*31^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.96, size = 52, normalized size = 0.83 \[ \frac {41932}{120125} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {4}{25} \, x + \frac {121 \, {\left (69 \, x + 61\right )}}{3875 \, {\left (5 \, x^{2} + 3 \, x + 2\right )}} - \frac {22}{125} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)^2/(5*x^2+3*x+2)^2,x, algorithm="maxima")

[Out]

41932/120125*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 4/25*x + 121/3875*(69*x + 61)/(5*x^2 + 3*x + 2) - 22/
125*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 51, normalized size = 0.81 \[ \frac {4\,x}{25}-\frac {22\,\ln \left (5\,x^2+3\,x+2\right )}{125}+\frac {\frac {8349\,x}{19375}+\frac {7381}{19375}}{x^2+\frac {3\,x}{5}+\frac {2}{5}}+\frac {41932\,\sqrt {31}\,\mathrm {atan}\left (\frac {10\,\sqrt {31}\,x}{31}+\frac {3\,\sqrt {31}}{31}\right )}{120125} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2 - x + 3)^2/(3*x + 5*x^2 + 2)^2,x)

[Out]

(4*x)/25 - (22*log(3*x + 5*x^2 + 2))/125 + ((8349*x)/19375 + 7381/19375)/((3*x)/5 + x^2 + 2/5) + (41932*31^(1/
2)*atan((10*31^(1/2)*x)/31 + (3*31^(1/2))/31))/120125

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 65, normalized size = 1.03 \[ \frac {4 x}{25} + \frac {8349 x + 7381}{19375 x^{2} + 11625 x + 7750} - \frac {22 \log {\left (x^{2} + \frac {3 x}{5} + \frac {2}{5} \right )}}{125} + \frac {41932 \sqrt {31} \operatorname {atan}{\left (\frac {10 \sqrt {31} x}{31} + \frac {3 \sqrt {31}}{31} \right )}}{120125} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2-x+3)**2/(5*x**2+3*x+2)**2,x)

[Out]

4*x/25 + (8349*x + 7381)/(19375*x**2 + 11625*x + 7750) - 22*log(x**2 + 3*x/5 + 2/5)/125 + 41932*sqrt(31)*atan(
10*sqrt(31)*x/31 + 3*sqrt(31)/31)/120125

________________________________________________________________________________________